import os
import time

from tools import ActionUtil


class GameOver:

    @staticmethod
    def do(shutdown=False):
        # 关闭游戏窗口
        ActionUtil.mouse_left_click((940, 18))
        time.sleep(3)
        # 关闭模拟器
        ActionUtil.mouse_left_click((560, 400))
        time.sleep(3)
        # 关机
        if shutdown:
            os.system('C:\\Windows\\System32\\shutdown.exe -s -t 0')
